<!DOCTYPE HTML>
<html lang="zxx">

<head>
	<title>江苏亦珣crm管理系统</title>
	<!-- Meta tag Keywords -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta charset="UTF-8" />
	<meta name="keywords" content="Triple Forms Responsive Widget,Login form widgets, Sign up Web forms , Login signup Responsive web form,Flat Pricing table,Flat Drop downs,Registration Forms,News letter Forms,Elements" />
	<link rel="Bookmark" href="admin/images/rookieCs.ico" />
	<link rel="Shortcut Icon" href="admin/images/rookieCs.ico" />
	<script>
        addEventListener("load", function () {
            setTimeout(hideURLbar, 0);
        }, false);

        function hideURLbar() {
            window.scrollTo(0, 1);
        }
	</script>
	<!-- Meta tag Keywords -->

	<!-- css files -->
	<link rel="stylesheet" type="text/css" media="all" href="admin/css/login/style.css" />
	<!-- Style-CSS -->
	<link rel="stylesheet" type="text/css" href="admin/css/login/font-awesome.min.css" >
	<!-- Font-Awesome-Icons-CSS -->
	<!-- //css files -->

</head>

<body>
<div class="main-bg" id="mian">
	<!-- title -->
	<h1>江苏亦珣crm管理系统</h1>
	<!-- //title -->
	<div class="sub-main-w3">
		<!-- vertical tabs -->
		<div class="vertical-tab">
			<div id="section1" class="section-w3ls">
				<input type="radio" name="sections" id="option1" checked>
				<!--<label for="option1" class="icon-left-w3pvt"><span class="fa fa-user-circle" aria-hidden="true"></span>登录</label>-->
				<article>
					<form id="loginForm" action="" method="post" style="height: 313.5px;">
						<h3 class="legend">账号登录</h3>
						<div class="input">
							<span class="fa fa-envelope-o" aria-hidden="true"></span>
							<input type="text" placeholder="账号" id="account" name="account" required />
						</div>
						<div class="input">
							<span class="fa fa-key" aria-hidden="true"></span>
							<input type="password" placeholder="密码" id="password" name="password" required />
						</div>
						<button type="button" class="btn submit" onclick="goLogin()">登 录</button>
						<a href="#" class="bottom-text-w3ls" onclick="setRemember()">
							<input type="radio" name="remember" id="remember" value="remember"><span style="font-size: 11px; margin-left: 10px; padding-bottom: 20px">记住密码</span>
						</a>
					</form>
				</article>
			</div>
			<!--<div id="section2" class="section-w3ls">-->
				<!--<input type="radio" name="sections" id="option2">-->
				<!--<label for="option2" class="icon-left-w3pvt"><span class="fa fa-pencil-square" aria-hidden="true"></span>小程序</label>-->
				<!--<article>-->
					<!--<form action="#" method="post" style="height: 313.5px;">-->
						<!--<h3 class="legend">云客微享</h3>-->
                        <!--<p class="para-style">打开微信扫一扫进入小程序。</p>-->
                        <!--<p class="para-style-2">首次使用小程序需要绑定云客微账号。</p>-->
                        <!--<img title="" src="admin/images/login/applet_qrcode.jpg" style="height: 154px">-->
					<!--</form>-->
				<!--</article>-->
			<!--</div>-->
		</div>
		<!-- //vertical tabs -->
		<div class="clear"></div>
	</div>
	<!-- copyright -->
	<div class="copyright">
	</div>
	<!-- //copyright -->
</div>

</body>
<!-- script   -->
<script type="text/javascript" src="https://www.jq22.com/jquery/vue.min.js"></script>
<script type="text/javascript" src="admin/lib/jquery/1.9.1/jquery.js"></script>
<script type="text/javascript" src="admin/lib/layer/3.1.1/layer.js"></script>
<script type="text/javascript" src="admin/js/common.js"></script>
<script type="text/javascript" src="admin/js/formatter.js"></script>
<script type="text/javascript" src="admin/js/utils.js"></script>
<!-- JavaScript 代码需要放在尾部（指定的HTML元素之后） -->
<script type="text/javascript">
    new Vue({
        el:'#mian',
        data: {
            nowYear:new Date().getFullYear()
        }
    });

    $(function () {
        var forcedLogout = sessionStorage.getItem("forcedLogout");
        if (forcedLogout) {
            layer.msg('您的账号在其它设备登录<br>于'+ forcedLogout +'被迫下线', {
                time: 0,
                btn: ['我已知晓']
            });
            sessionStorage.removeItem("forcedLogout");
		}
        var disabledLogout = sessionStorage.getItem("disabledLogout");
        if (disabledLogout) {
            layer.msg('您的账号已被停用<br>于'+ disabledLogout +'被迫下线', {
                time: 0,
                btn: ['我已知晓']
            });
            sessionStorage.removeItem("disabledLogout");
		}
        var socket_closed = sessionStorage.getItem("socket_closed");
        if (socket_closed) {
            layer.msg('您与服务器断开连接<br>于'+ socket_closed +'下线', {
                time: 0,
                btn: ['我已知晓']
            });
            sessionStorage.removeItem("socket_closed");
		}

        $(document).keypress(function (e) {
            if (e.which == 13) {
                goLogin();
            }
        });
        //获取cookie信息
        var account = cookieUtil.getCookieValue("account");
        if (account && account.length > 0) {
            $("#account").val(account);
            $("#account").focus();
            $("#account").blur();
        }
        var password = cookieUtil.getCookieValue("password");
        if (password && password.length > 0) {
            $("#password").val(password);
            $("#password").focus();
            $("#password").blur();
        }
    });

    //记住密码
    function setRemember() {
        if ($("#remember")[0].checked) {
            $("#remember")[0].checked = false;
        } else {
            $("#remember")[0].checked = true;
        }
    }

    //登录
    function goLogin() {
        var formData = getFormData("loginForm");
        var successFun = function(bizData) {
            if ($("#remember")[0].checked) {
                var pathStr = getRootPath();
                cookieUtil.addCookie("account", $("#account").val(), 7, pathStr);
                cookieUtil.addCookie("password", $("#password").val(), 7, pathStr);
            }
            window.location.href="index.html";
        };
        ajaxPostFun("user/login", formData, successFun, null, "登录系统");
    }
</script>
<!-- //script -->

</html>
